package com.wjh.bean;

import java.util.List;

public class Student {
    private Long sid;

    private String sname;

    private List<Course> courses;
    public Student(Long id, String sname) {
        this.sid = id;
        this.sname = sname;
    }

    public Student() {
        super();
    }

    public Long getId() {
        return sid;
    }

    public void setId(Long id) {
        this.sid = id;
    }

    public String getName() {
        return sname;
    }

    public void setName(String name) {
        this.sname = name == null ? null : name.trim();
    }

    public void setCourses(List<Course> courses) {
        this.courses = courses;
    }

    public List<Course> getCourses() {
        return courses;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + sid +
                ", name='" + sname + '\'' +
                '}';
    }
}